#!/usr/bin/env python3
"""
工业物联网数据采集系统安装脚本
"""

from setuptools import setup, find_packages
import os

# 读取 README 文件
def read_readme():
    with open("README.md", "r", encoding="utf-8") as fh:
        return fh.read()

# 读取依赖文件
def read_requirements():
    with open("requirements.txt", "r", encoding="utf-8") as fh:
        return [line.strip() for line in fh if line.strip() and not line.startswith("#")]

setup(
    name="industrial-iot-collector",
    version="1.0.0",
    author="Industrial IoT Team",
    author_email="iot@company.com",
    description="工业物联网数据采集系统",
    long_description=read_readme(),
    long_description_content_type="text/markdown",
    url="https://github.com/company/industrial-iot-collector",
    packages=find_packages(),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Manufacturing",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.12",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: System :: Monitoring",
        "Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator",
    ],
    python_requires=">=3.12",
    install_requires=read_requirements(),
    extras_require={
        "dev": [
            "pytest>=7.4.4",
            "pytest-cov>=4.1.0",
            "black>=24.1.1",
            "flake8>=7.0.0",
        ],
        "influxdb": [
            "influxdb-client>=1.42.0",
        ],
        "mysql": [
            "PyMySQL>=1.1.0",
        ],
    },
    entry_points={
        "console_scripts": [
            "iot-collector=main:main",
        ],
    },
    include_package_data=True,
    package_data={
        "config": ["*.yaml", "*.json"],
        "web": ["templates/*.html", "static/*"],
        "docs": ["*.md"],
    },
    zip_safe=False,
) 